package ${package.Entity};

import java.io.Serializable;
<#if swagger2>
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
</#if>
<#if entityLombokModel>
import lombok.*;
</#if>
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import com.cocam.erp.validator.PageGroup;
import com.cocam.erp.validator.TimeGroup;
/**
* <p>
* ${table.comment!} ${table.name}
* </p>
*
* @classname: ${entity}
* @author ${author}
* @since ${date}
* @description: ${table.comment!} 实体类
* @towork: none
* @version: 1.0.0
*/

@Data
@EqualsAndHashCode(callSuper = false)
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class ${entity} implements Serializable {

    private static final long serialVersionUID = 1L;

<#-- ----------  BEGIN 字段循环遍历  ---------->
<#list table.fields as field>
    <#if field.keyFlag>
        <#assign keyPropertyName="${field.propertyName}"/>
    </#if>
    <#if field.comment!?length gt 0>
        <#if swagger2>
            @ApiModelProperty(value = "${field.comment}")
        <#else>
     /**
      * ${field.comment}
      */
        </#if>
    </#if>
    private ${field.propertyType} ${field.propertyName};
    
</#list>
/**
* 页数
*/
@Min(value = 1, message = "页数最小值为1")
@NotNull(message = "页码不能为空", groups = {PageGroup.class})
private Integer pageNum;

/**
* 每页多少条数据
*/
@Min(value = 1, message = "分页条数最小为1")
@NotNull(message = "分页条数不能为空", groups = {PageGroup.class})
private Integer pageSize;

/**
* 排序字段
*/
@NotNull(message = "排序字段不能为空", groups = {PageGroup.class})
private String sort_info;

/**
* 排序方式 DESC 倒序ASC正序
*/
@NotNull(message = "排序方式不能为空", groups = {PageGroup.class})
private String sort_type;

/**
* 开始时间
*/
@NotNull(message = "开始时间不能为空", groups = {TimeGroup.class})
private String start_time;

/**
* 结束时间
*/
@NotNull(message = "结束时间不能为空", groups = {TimeGroup.class})
private String end_time;
}
